KBSpec: LLM-driven Formal Specification Generation with Evolving Domain Knowledge Base

Automated formal specification generation is a key step towards program understanding and formal verification. Recently, due to the success of large language models (LLMs) in code generation, researchers have made early attempts to adopt LLMs for generating formal specifications. However, the lack o…